<?php

/**
 * Description of sc
 *
 * @author Christian Simon
 */
class modelCharacterRoleplay extends modelCharacter {

    public $relations;
    public $_cid;
    public $_oid;
    public $task;
    public $description;
    public $organisation;
    public $lastname;
    public $age;
    public $profile;
    
    public static $table = "roleplay_character";
    
    public function deserialize($query) {
        $query = (object) $query;
        $this->id = $query->_id;
        $this->surname = htmlentities($query->surname, ENT_QUOTES, 'UTF-8');
        $this->lastname = htmlentities($query->lastname, ENT_QUOTES, 'UTF-8');
        $this->class = $query->class;
        $this->rank = controllerRank::getNameById($query->_rid, 'RP');
        $this->status = htmlentities($query->status, ENT_QUOTES, 'UTF-8');
        $this->gender = $query->gender;
        $this->task = htmlentities($query->task, ENT_QUOTES, 'UTF-8');
        $this->profile = $query->profile;
        $this->description = htmlentities($query->description, ENT_QUOTES, 'UTF-8');
        $this->race = $query->race;
        return $this;
    }

}

?>
